package com.bjpowernode.javase.collection.linkedHashSetTest;


import java.util.LinkedHashSet;

public class OrderTestAccount {
    public static void main(String[] args) {
        LinkedHashSet<Account> accounts = new LinkedHashSet<>();
        Account account1 = new Account("sxt1",20,"sxt1");
        Account account2 = new Account("sxt2",21,"sxt2");
        Account account3 = new Account("sxt3",22,"sxt3");
        Account account4 = new Account("sxt4",23,"sxt4");
        Account account5 = new Account("sxt4",23,"sxt5");

        accounts.add(account3);
        accounts.add(account4);
        accounts.add(account1);
        accounts.add(account2);
        accounts.add(account5);
        accounts.forEach(System.out::println);
    }
}
